﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<ComeSeeThis_MVC2.Models.MotorFormView>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Edit Motor
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
        <% Html.RenderPartial("SubMenu"); %>
<h2>
        Edit Motor</h2>
    <% using (Html.BeginForm())
       {%>
    <%: Html.ValidationSummary(true) %>
    <fieldset>
        <legend>
            <%: Model.Motor.MotorName %></legend>
        <table>
            <tr>
                <th>
                    Company
                </th>
                <td>
                    <%: Html.DropDownListFor(model => model.Motor.CompanyId, Model.Companies) %>
                    <%: Html.ValidationMessageFor(model => model.Motor.CompanyId) %>
                </td>
            </tr>
            <tr>
                <th>
                    Motor Name
                </th>
                <td>
                    <%: Html.TextBoxFor(model => model.Motor.MotorName) %>
                    <%: Html.ValidationMessageFor(model => model.Motor.MotorName) %>
                </td>
            </tr>
            <tr>
                <th>
                    Part Number
                </th>
                <td>
                    <%: Html.TextBoxFor(model => model.Motor.PartNumber) %>
                    <%: Html.ValidationMessageFor(model => model.Motor.PartNumber) %>
                </td>
            </tr>
            <tr>
                <th>
                    Size
                </th>
                <td>
                    <%: Html.DropDownListFor(model => model.Motor.MotorSizeId, Model.MotorSizes) %>
                </td>
            </tr>
            <tr>
                <th>
                    Turns
                </th>
                <td>
                    <%: Html.TextBoxFor(model => model.Motor.Turns, String.Format("{0:F}", Model.Motor.Turns)) %>
                    <%: Html.ValidationMessageFor(model => model.Motor.Turns) %>
                </td>
            </tr>
            <tr>
                <th>
                    KiloVolt
                </th>
                <td>
                    <%: Html.TextBoxFor(model => model.Motor.KiloVolt) %>
                    <%: Html.ValidationMessageFor(model => model.Motor.KiloVolt) %>
                </td>
            </tr>
            <tr>
                <th>
                    Magnet Type
                </th>
                <td>
                    <%: Html.TextBoxFor(model => model.Motor.MagnetType) %>
                    <%: Html.ValidationMessageFor(model => model.Motor.MagnetType) %>
                </td>
            </tr>
            <tr>
                <th>
                    Magnet Size (mm)
                </th>
                <td>
                    <%: Html.TextBoxFor(model => model.Motor.MagnetSize) %>
                    <%: Html.ValidationMessageFor(model => model.Motor.MagnetSize) %>
                </td>
            </tr>
            <tr>
                <th>
                    Watts
                </th>
                <td>
                    <%: Html.TextBoxFor(model => model.Motor.Watts, String.Format("{0:F}", Model.Motor.Watts)) %>
                    <%: Html.ValidationMessageFor(model => model.Motor.Watts) %>
                </td>
            </tr>
            <tr>
                <th>
                    Sensored
                </th>
                <td>
                    <%: Html.CheckBoxFor(model => model.Motor.Sensored)%>
                    <%: Html.ValidationMessageFor(model => model.Motor.Sensored) %>
                </td>
            </tr>
            <tr>
                <th>
                    Approved
                </th>
                <td>
                    <%: Html.CheckBoxFor(model => model.Motor.Approved)%>
                    <%: Html.ValidationMessageFor(model => model.Motor.Approved) %>
                </td>
            </tr>
        </table>
        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
    <% } %>
    <div>
        <%: Html.ActionLink("Back to List", "Index") %>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HeaderContent" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="BodyTagContent" runat="server">
</asp:Content>
